/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package psd.semana1.aula.semaforo;

import java.net.ServerSocket;
import java.net.Socket;

/**
 *
 * @author nfsa
 */
public class SemaforoServerMain {

    public static void semaforoServerMain() throws Exception
    {
        Semaforo sm = new Semaforo();
        ServerSocket ss = new ServerSocket(12345);
        
        while (true)
        {
            Socket s = ss.accept();
            Thread t = new ThreadLigacao(s, sm);
            t.start();
        }
    }
}
